Microsoft DirectX 8.1 (C++)

CImagePalette::CopyPalette

Copies the palette out of any YUV or true-color VIDEOINFOHEADER structure into a palettized VIDEOINFOHEADER structure.

Syntax

HRESULT CopyPalette(
    const CMediaType *pSrc,
    const CMediaType *pDest
);

Parameters

pSrc

Pointer to the source media type.

pDest

Pointer to the destination media type.

Return Value

Returns NOERROR if successful or S_FALSE if no palette is available.

Remarks

This member function is used when changing palettes on DirectDraw� samples. A filter acting as a source to the renderer can attach a palette to any buffer and pass it to the renderer as a new VIDEOINFOHEADER format. The renderer can then call CopyPalette to make a new palette from that format, and copy the palette colors into the new connection type.

See Also